#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
void main()
{
	int i = 0;
	int bai = 0;
	int ge= 0;
	int cnt = 0;
	for (i = 100; i <= 999; i++)
	{
		int bai = i / 100;
		int ge = i % 10;
		if (bai == ge)
		{
			printf("%d  ", i);
			cnt++;
			if (cnt % 8 == 0)
			{
				printf("\n");
			}
			else
			{
			}
		}
		else
		{
		}

	}
}